package com.druid.response.openai;

import com.fasterxml.jackson.annotation.JsonProperty;

public class OpenAIResponse {

    /**
     * 生成的文本
     */
    @JsonProperty("choices")
    private OpenAIChoice[] choices;

    public OpenAIResponse() {
    }

    public OpenAIChoice[] getChoices() {
        return choices;
    }

    public void setChoices(OpenAIChoice[] choices) {
        this.choices = choices;
    }

    /**
     * OpenAI 生成的选择，包含生成的文本以及对应的文本生成分数
     */
    public static class OpenAIChoice {
        @JsonProperty("text")
        private String text;

        @JsonProperty("score")
        private double score;

        public OpenAIChoice() {
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public double getScore() {
            return score;
        }

        public void setScore(double score) {
            this.score = score;
        }
    }
}
